Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUT11 sign outputs #4

Merged
merged 6 commits into from
Sep 20, 2024
Merged

Conversation

lollerfirst
Copy link
Contributor

Fixes: this issue

Description

Adding support for signing the outputs when needed. This is a step towards SIG_ALL implementation and a fix for issues when trying to redeem SIG_ALL tokens on cashu.me and others that use cashu-ts behind the scenes. With this functionality we can then instruct cashu-ts to sign the outputs when it finds SIG_ALL tags.

Changes

  • added signBlindedMessage, getSignedOutput, getSignedOutputs
  • introduced a new optional field witness in BlindedMessage
  • modified createRandomBlindedMessage and blindMessage to allow a private key to be specified as input and act accordingly.
  • npm run format

PR Tasks

  • Open PR
  • run npm run test --> no failing unit tests
  • run npm run format

Copy link
Collaborator

@gandlafbtc gandlafbtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

Just added some suggestions for return types in method signatures

src/client/NUT11.ts Outdated Show resolved Hide resolved
src/mint/NUT11.ts Outdated Show resolved Hide resolved
lollerfirst and others added 2 commits September 19, 2024 10:34
@gandlafbtc gandlafbtc merged commit 2620908 into cashubtc:master Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] P2PK does not support SIG_ALL
2 participants